<template>
  <div class="page">
    <div class="banner"></div>
    <div class="my-id">
      <div class="title">我的身份：CFL节点</div>
      <div class="nodes">
        <div class="item">
          <div class="icon"><img src="../assets/nodes/icon1.png" alt=""></div>
          <div class="text">
            已获得佣金：<span>1000</span> USDT
          </div>
          <button>提取傭金</button>
        </div>

        <div class="item">
          <div class="icon"><img src="../assets/nodes/icon2.png" alt=""></div>
          <div class="text">
            礦池收益：<span>1000</span> CFX
          </div>
          <button>提取收益</button>
        </div>

        <div class="item">
          <div class="icon"><img src="../assets/nodes/icon3.png" alt=""></div>
          <div class="text">
            我的空投：<span>1000</span> CFX
          </div>
          <button>提取空投</button>
        </div>

        <div class="item">
          <div class="icon"><img src="../assets/nodes/icon4.png" alt=""></div>
          <div class="text">
            生態分紅：<span>1000</span> CFX
          </div>
          <button>提取分紅</button>
        </div>
      </div>
    </div>
    <div class="hr"></div>
    <div class="apply">
      <div class="title">申请成为节点</div>
    </div>
    <div class="slide-list">
      <button class="toggle" :class="{rotate:isOpen1}" @click="isOpen1=!isOpen1"><img src="../assets/nodes/toggle.png" alt=""></button>
      <div class="header">
        <div class="title">成為節點的要求？</div>
      </div>
     <div v-if="isOpen1">
       <div class="item">
         <div class="no">1</div><p>有社區基礎，一個社區僅限1個節點；</p>
       </div>
       <div class="item">
         <div class="no">2</div><p>有社區基礎，一個社區僅限1個節點；</p>
       </div>
       <div class="item">
         <div class="no">3</div><p>5000USDT購買NFT成為預備節點，在礦池內質押3000枚CFX激活節點。</p>
       </div>
     </div>
    </div>

    <div class="slide-list">
      <button class="toggle" :class="{rotate:isOpen2}" @click="isOpen2=!isOpen2"><img src="../assets/nodes/toggle.png" alt=""></button>
      <div class="header">
        <div class="title">為什麽要成為節點？</div>
      </div>
      <div v-if="isOpen2">
        <p>成为节点，立即获得节点八大权益：</p>
        <div class="item">
          <div class="no">1</div><p>专属NFT，可转让。</p>
        </div>
        <div class="item">
          <div class="no">2</div><p>参与DAO治理，有提案权。</p>
        </div>
        <div class="item">
          <div class="no">3</div><p>享受矿池收益分红。</p>
        </div>
        <div class="item">
          <div class="no">4</div><p>获取5000枚CFL空投。</p>
        </div>
        <div class="item">
          <div class="no">5</div><p>推广节点获取10%佣金奖励（500USDT）。</p>
        </div>
        <div class="item">
          <div class="no">6</div><p>享受优先推荐生态入驻权。</p>
        </div>
        <div class="item">
          <div class="no">7</div><p>享受社区补贴，不定期空投。</p>
        </div>
        <div class="item">
          <div class="no">8</div><p>享受后期所有生态分红。</p>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Nodes",
  data(){
    return{
      isOpen1:true,
      isOpen2:true
    }
  }
}
</script>

<style scoped lang="less">
.banner {
  background: url('@/assets/nodes/banner.png') no-repeat center;
  background-size: cover;
}
.my-id{
  padding-top: 9px;
  .title{
    font-size: 14px;
    font-weight: bold;
    line-height: 22px;
  }
}
.nodes{
  .item{
    width: 400px;
    height: 30px;
    border-radius: 6px;
    opacity: 1;
    background: #fff;
    padding-left: 25px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    border-width: 1px 0px 0px 1px;
    border-style: solid;
    border-color: #E8E8E8;
    margin-top: 8px;
    button{
      width: 114px;
      height: 21px;
      border-radius: 4px;
      background: #9C27B0;
      color:#fff;
    }
  }
  .text{
    width: 215px;
    font-size: 14px;
    line-height: 30px;
    text-align: left;
    margin-left: 7px;
    color:#6E767D;
    span{
      font-weight: bold;
    }
  }
  .icon{
    width: 16px;
    height: 16px;
    img{
      display: block;
      max-height: 100%;
      max-width: 100%;
    }
  }
}

.apply{
  width: 209px;
  height: 38px;
  border-radius: 20px;
  background: #9C27B0;
  text-align: center;
  line-height: 38px;
  color:#fff;
  margin:0 auto;
  font-size: 20px
}

.slide-list{
  position: relative;
  margin-top: 14px;
  background: #FFA000;
  padding:9px;
  border-radius: 6px;

  .title{
    padding:0 13px;
    height: 25px;
    line-height: 25px;
    font-size: 20px;
    font-weight: bold;
    color: #9C27B0;
    background: #fff;
    display: inline-block;
    border-radius: 12.5px;
  }
  .toggle{
    width: 18px;
    height: 18px;
    border-radius: 50%;
    position: absolute;
    top: 12px;
    right: 22px;
    transition: .3s;

    img{
      display: block;
      max-width: 100%;
      max-height: 100%;
    }
    &.rotate{
      transform: rotate(180deg);
    }
  }
  .item{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 14px;
    color:#1E1E1E;
    p{
      text-align: left;

    }
    .no{
      height: 38px;
      width: 38px;
      background: url('@/assets/nodes/no-bg.png') no-repeat center;
      background-size: cover;
      line-height: 38px;
      font-size: 14px;
      color:#fff;
    }
    margin-top: 13px;
    &:first-child{
      margin-top: 0;
    }
  }
}
</style>